#include <cstdio>
using namespace std;

#define MSG_NUM 3
#define MSG_SIZE 1024

int main()
{
    char v[MSG_NUM][MSG_SIZE];
    for (int i = 0; i < MSG_NUM; i++) {
        scanf(" %s", v[i]);
    }

    for (int i = 0; i < MSG_SIZE; i++) {
        if (v[0][i] > v[1][i] && v[0][i] > v[2][i]) {
            printf("%s\n", v[0]);
            break;
        }
        if (v[1][i] > v[2][i] && v[1][i] > v[0][i]) {
            printf("%s\n", v[1]);
            break;
        }
        if (v[2][i] > v[1][i] && v[2][i] > v[0][i]) {
            printf("%s\n", v[2]);
            break;
        }
    }

    return 0;
}